package com.chanjiedata.changbs.adapter;

import android.content.Context;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.chanjiedata.changbs.R;
import com.chanjiedata.changbs.help.GlideHelper;
import com.chanjiedata.changbs.proto.Mystock;

import java.util.List;

/**
 * 文件名 : ProgressAdapter
 * 创建者 : MangoWang
 * 创建日期 : 2019/11/25 11:50
 * 微信 : MangoWaWang
 * 邮箱 : 763482205@qq.com
 * 描述 : TODO
 */

public class AllocPartnerAdapter extends BaseQuickAdapter<Mystock.get_transfer_mb_list.List,BaseViewHolder> {
    public AllocPartnerAdapter(Context context, List<  Mystock.get_transfer_mb_list.List> dataList) {
        super(R.layout.item_alloca_partner,dataList);
    }

    @Override
    protected void convert(BaseViewHolder helper,   Mystock.get_transfer_mb_list.List item) {

        helper.setText(R.id.tv_name,item.getMemberName())
                .setText(R.id.tv_phone,item.getMemberMobile())
                .setText(R.id.tv_id,item.getMemberId());

        if (item.getMemberMobile().equals("1"))
        {
            helper.getView(R.id.tv_phone).setVisibility(View.INVISIBLE);
        }else{
            helper.getView(R.id.tv_phone).setVisibility(View.VISIBLE);
        }
        GlideHelper.INSTANCE.loadAvatar( helper.getView(R.id.iv_head),item.getMemberAvatar());
    }
}